package com.bing.bingPro.util;

import java.util.LinkedHashMap;
import java.util.Map;

public class ProvinceUtil {
    private ProvinceUtil() {
    }
    public static String getKeyProvince(String code) {
        final Map<String, String> provinceGetKeyMap = new LinkedHashMap<>();
        provinceGetKeyMap.put("安徽", "AH");
        provinceGetKeyMap.put("北京", "BJ");
        provinceGetKeyMap.put("重庆", "CQ");
        provinceGetKeyMap.put("福建", "FJ");
        provinceGetKeyMap.put("广东", "GD");
        provinceGetKeyMap.put("甘肃", "GS");
        provinceGetKeyMap.put("广西", "GX");
        provinceGetKeyMap.put("贵州", "GZ");
        provinceGetKeyMap.put("河南", "HA");
        provinceGetKeyMap.put("湖北", "HB");
        provinceGetKeyMap.put("河北", "HE");
        provinceGetKeyMap.put("海南", "HI");
        provinceGetKeyMap.put("黑龙江", "HL");
        provinceGetKeyMap.put("湖南", "HN");
        provinceGetKeyMap.put("吉林", "JL");
        provinceGetKeyMap.put("江苏", "JS");
        provinceGetKeyMap.put("江西", "JX");
        provinceGetKeyMap.put("辽宁", "LN");
        provinceGetKeyMap.put("内蒙古", "NM");
        provinceGetKeyMap.put("宁夏", "");
        provinceGetKeyMap.put("青海", "QH");
        provinceGetKeyMap.put("四川", "SC");
        provinceGetKeyMap.put("山东", "SD");
        provinceGetKeyMap.put("上海", "SH");
        provinceGetKeyMap.put("陕西", "SN");
        provinceGetKeyMap.put("山西", "SX");
        provinceGetKeyMap.put("天津", "TJ");
        provinceGetKeyMap.put("新疆", "XJ");
        provinceGetKeyMap.put("西藏", "XZ");
        provinceGetKeyMap.put("云南", "YN");
        provinceGetKeyMap.put("浙江", "ZJ");
        if (!provinceGetKeyMap.containsKey(code)) {
            return null;
        }
        return provinceGetKeyMap.get(code);
    }

    public static String getProvinceCode(String code) {
        final Map<String, String> provinceGetKeyMap = new LinkedHashMap<>();
        provinceGetKeyMap.put("AH", "43");
        provinceGetKeyMap.put("BJ", "32");
        provinceGetKeyMap.put("CQ", "53");
        provinceGetKeyMap.put("FJ", "44");
        provinceGetKeyMap.put("GD", "50");
        provinceGetKeyMap.put("GS", "58");
        provinceGetKeyMap.put("GX", "52");
        provinceGetKeyMap.put("GZ", "55");
        provinceGetKeyMap.put("HA", "47");
        provinceGetKeyMap.put("HB", "48");
        provinceGetKeyMap.put("HE", "34");
        provinceGetKeyMap.put("HI", "51");
        provinceGetKeyMap.put("HL", "39");
        provinceGetKeyMap.put("HN", "49");
        provinceGetKeyMap.put("JL", "38");
        provinceGetKeyMap.put("JS", "41");
        provinceGetKeyMap.put("JX", "45");
        provinceGetKeyMap.put("LN", "37");
        provinceGetKeyMap.put("NM", "36");
        provinceGetKeyMap.put("NX", "60");
        provinceGetKeyMap.put("QH", "59");
        provinceGetKeyMap.put("SC", "54");
        provinceGetKeyMap.put("SD", "46");
        provinceGetKeyMap.put("SH", "40");
        provinceGetKeyMap.put("SN", "57");
        provinceGetKeyMap.put("SX", "35");
        provinceGetKeyMap.put("TJ", "33");
        provinceGetKeyMap.put("XJ", "61");
        provinceGetKeyMap.put("XZ", "62");
        provinceGetKeyMap.put("YN", "56");
        provinceGetKeyMap.put("ZJ", "42");
        if (!provinceGetKeyMap.containsKey(code)) {
            return null;
        }
        return provinceGetKeyMap.get(code);
    }

    public static String getProvince(String code) {
        final  Map<String, String> provinceNameMap = new LinkedHashMap<>();
        provinceNameMap.put("AH", "安徽");
        provinceNameMap.put("BJ", "北京");
        provinceNameMap.put("CQ", "重庆");
        provinceNameMap.put("FJ", "福建");
        provinceNameMap.put("GD", "广东");
        provinceNameMap.put("GS", "甘肃");
        provinceNameMap.put("GX", "广西");
        provinceNameMap.put("GZ", "贵州");
        provinceNameMap.put("HA", "河南");
        provinceNameMap.put("HB", "湖北");
        provinceNameMap.put("HE", "河北");
        provinceNameMap.put("HI", "海南");
        provinceNameMap.put("HL", "黑龙江");
        provinceNameMap.put("HN", "湖南");
        provinceNameMap.put("JL", "吉林");
        provinceNameMap.put("JS", "江苏");
        provinceNameMap.put("JX", "江西");
        provinceNameMap.put("LN", "辽宁");
        provinceNameMap.put("NM", "内蒙古");
        provinceNameMap.put("NX", "宁夏");
        provinceNameMap.put("QH", "青海");
        provinceNameMap.put("SC", "四川");
        provinceNameMap.put("SD", "山东");
        provinceNameMap.put("SH", "上海");
        provinceNameMap.put("SN", "陕西");
        provinceNameMap.put("SX", "山西");
        provinceNameMap.put("TJ", "天津");
        provinceNameMap.put("XJ", "新疆");
        provinceNameMap.put("XZ", "西藏");
        provinceNameMap.put("YN", "云南");
        provinceNameMap.put("ZJ", "浙江");
        if (!provinceNameMap.containsKey(code)) {
            return null;
        }
        return provinceNameMap.get(code);
    }

    public static String getOrderType(String code) {
        final Map<String, String> provinceGetKeyMap = new LinkedHashMap<>();
        provinceGetKeyMap.put("装机工单", "install");
        provinceGetKeyMap.put("投诉工单", "cp");
        if (!provinceGetKeyMap.containsKey(code)) {
            return null;
        }
        return provinceGetKeyMap.get(code);
    }

    public static String matchAnomalyType(String code) {
        final Map<String, String> provinceGetKeyMap = new LinkedHashMap<>();
        provinceGetKeyMap.put("1", "人员画像中有，成本随销中没有");
        provinceGetKeyMap.put("2", "人员画像中没有，成本随销中有");
        if (!provinceGetKeyMap.containsKey(code)) {
            return null;
        }
        return provinceGetKeyMap.get(code);
    }
}
